package cn.edu.huas.shopping.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;

import java.time.LocalDateTime;

public class User {
    private Integer id;
    private String username;
    //@JsonIgnore//该属性不会u被Jackson处理,很多坑都是自己挖的
    private String pwd;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime doTime;

    public User() {

    }

    public User(String username, String pwd) {
        this.username = username;
        this.pwd = pwd;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public LocalDateTime getDoTime() {
        return doTime;
    }

    public void setDoTime(LocalDateTime doTime) {
        this.doTime = doTime;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", pwd='" + pwd + '\'' +
                ", doTime=" + doTime +
                '}';
    }
}
